<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    {load href='/static/css/bootstrap.css'}
    {load href='/static/css/all.css'}
    {load href='/static/js/jquery-3.4.1.min.js'}
    {load href='/static/js/bootstrap.min.js'}
    {load href='/static/js/bootbox.min.js'}
    <style>
        .pagination{float:right}
        .pagination>li{margin-left: 4px;}
        .m{margin: auto auto;width: 400px;height: 360px;background-color: rgba(220,220,220,0.3);
        }
        .container-furid{
            width: 40%;

        }
        body{position:relative;box-sizing: border-box;font-size: 12px;justify-content: center;align-items: center;display: flex;background-color: rgba(220, 220, 220, 0);}
        .btn{
            width: 80px; /* 设置按钮宽度为 80 像素，可根据实际需求调整数值 */
            height: 30px; /* 设置按钮高度为 30 像素，可根据实际需求调整数值 */
            font-size: 12px; /* 同时可以适当调小按钮文字的字体大小，让整体更协调 */
            padding: 5px 10px;
        }
        .form-control{
            height: 30px;
        }
    </style>

</head>
<body>
<div class="m">
    <div class="container-fluid">
        <div class="row">
            <div class="col">
                <h2 align="center" style="margin: 30px">修改密码</h2>
                <form id="updatepwd">
                    <div class="input-group mb-4">
                        <div class="input-group-prepend">
                    <span class="input-group-text">
                        <i class="fa fa-key" aria-hidden="true"></i>
                    </span>
                        </div>
                        <input type="search" name="password1" class="form-control" placeholder="请输入原密码">
                    </div>
                    <div class="input-group mb-4">
                        <div class="input-group-prepend">
                    <span class="input-group-text">
                        <i class="fa fa-key" aria-hidden="true"></i>
                    </span>
                        </div>
                        <input type="search" name="password" class="form-control" placeholder="请输入密码">
                    </div>
                    <div class="input-group mb-4">
                        <div class="input-group-prepend">
                    <span class="input-group-text">
                        <i class="fa fa-key" aria-hidden="true"></i>
                    </span>
                        </div>
                        <input type="search" name="password2" class="form-control" placeholder="请再次确认密码">
                    </div>
                    <div class="form-group" style="text-align: center">
                        <button type="button" class="btn btn-primary" onclick="updatep()">修改</button>&nbsp;&nbsp;&nbsp;&nbsp;
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
</body>
</html>
<script>
    function updatep(){
        $.post('/index.php/index/updatep',$("#updatepwd").serialize(),function(res){
            if(res==1){
                bootbox.alert("修改成功,请退出重新登录！！！！！！！！！！！！！",function(){
                    window.location.reload();
                })
            }else{
                bootbox.alert("修改失败");
            }
        })
    }
</script>